<template>
  <div class="main">
      <Header/>
      <div class="container">
        <mt-swipe :auto="4000">
            <mt-swipe-item><img width="100%" src="../../../static/1.jpg" alt=""></mt-swipe-item>
            <mt-swipe-item><img width="100%" src="../../../static/2.jpg" alt=""></mt-swipe-item>
            <mt-swipe-item><img width="100%" src="../../../static/3.jpg" alt=""></mt-swipe-item>
        </mt-swipe>
        <div class="shopping">
            <div class="title">华为(HUAWEI)荣耀6Plus16G双4G版</div>
            <hr>
            <div class="shopping-footer">
                <div class="price">
                    <span>市场价</span>
                    <span class="old-price">￥2499</span>
                    <span>销售价</span>
                    <span class="new-price">￥2196</span>
                </div>
                <div class="num">
                    <!-- <input type="number" name="num" id="2"> -->
                     <span class="num-text"> 购买数量 :</span><InputBtn :num="1" />
                </div>
                <div class="btn">
                    <mt-button type="primary">立即购买</mt-button>
                    <mt-button type="danger">加入购物车</mt-button>
                </div>
            </div>
        </div>
        <div class="goods">
            <div class="goods-title">商品参数</div>
            <hr>
            <div class="text">
                <div>
                    <span>商品货号 : </span>
                    <span >SD91045646513</span>
                </div>
                <div class="text-two">
                    <span>库存情况 : </span>
                    <span >60件</span>
                </div>
                <div>
                    <span>上架时间 : </span>
                    <span >2015-04-20 00:15:48</span>
                </div>
            </div>
            <hr>
            <div class="goods-btn" >
                <mt-button @click="$router.push(`/goods/${$route.params.id}/details`)" class="mint-button mint-button--primary mint-button--large is-plain">图文介绍</mt-button>
                <mt-button class="mint-button mint-button--danger mint-button--large is-plain">商品评论</mt-button>
            </div>
        </div>
      </div>
  </div>
</template>

<script>
import Header from '../Header/Header.vue'
import InputBtn from '../InputBtn/InputBtn.vue'
export default {
    components: { Header, InputBtn },
    data(){
        return {
            number:0
        }
    },
}
</script>

<style scoped>
.main{
    margin-bottom: 8vh;
    background: #eee;
}
.container{
    margin-top: 6vh;
    padding: 10px;
}
.mint-swipe{
    margin-bottom: 10px;
    box-shadow: 2px 2px 6px 0px;
    height: 40vh;
}
.shopping{
    margin-bottom: 10px;
    text-align: left;
    background: white;
}
.title{
    padding: 10px 10px 0px 10px;
    margin-bottom: 5px;
}

.shopping-footer{
    padding: 10px;
    font-size: 12px;
    color: #999;
}
.old-price{
    text-decoration: line-through;
}
.new-price{
    font-size: 14px;
    color: red;
    font-weight: 700;
}
.num{
    margin: 10px 0px;
    display: flex;
}
.num-text{
    display: inline-block;
    margin-right: 5px;
}
.btn{
    line-height: 33px;  
}
.mint-button {
    width: 80px;
    height: 30px;
    font-size: 12px;
}

.goods{
    text-align: left;
    background: white;
}
.goods-title{
    padding: 10px 10px 0px 10px;
    margin-bottom: 5px;
}
.text{
    padding: 10px;
    font-size: 12px;
    color: #999;
}
.text-two{
    margin: 5px 0px;
}
.goods-btn{
    padding: 10px;
}
.mint-button{
    margin-bottom: 10px;
    width: 100%;
}
</style>